Switch year

Description

Leave blank to use the default value of 30. If the user types in a 2 digit year that is above the switch year, then the year is assumed to be in 1900.

Discussion

The Switch year defines how a two digit year in a date is interpreted. Two digit years on or after the specified value will be interpreted as occuring in the 1900s. Two digit years before the specified Switch year will be interpreted as occuring in the 2000s.

It is recommended that you use four digit years rather than two digit years in your applications.

Configuring the Switch Year Behavior on the Application Server

By default, all two digit years are interpted as occuring in the 2000s. You can change this behavior on the Web Application Server in the Web Project Properties:

  1. From the Web Projects Control Panel, open the Project Properties.

    /documentation/pages/images/switchYear1.png
  2. Locate the Switch year property.

    /documentation/pages/images/switchYear2.png
  3. Set the switch year to the desired default and save your changes. Leave the Switch year blank in the Project Properties to interpret all two digit years as occuring in the 2000s.